#ifndef __VSCENEOBJECT_H__
#define __VSCENEOBJECT_H__
#include "VRTTClass.h"

enum EVSceneLayer
{
	VSL_DECAL = 0,
	VSL_TILE = 1,
	VSL_FOREGROUND = 2,
	// user layer.
	VSL_FOG = 0x7ffe,
	VSL_CLOUD = 0x7fff,
};

class VQuadTreeNode;

class VApi VSceneObject : public VRTTObject
{
	VDECLARE_CLASS(VSceneObject);
	friend class VScene;
	friend class VQuadTreeNode;
public:
	VSceneObject(void);
	virtual ~VSceneObject(void);

	inline void SetPosition(const VVector2f& LocalPos) { m_Position = LocalPos; }
	inline const VVector2f& GetPosition() const { return m_Position;}

	virtual void OnVisble();
	virtual void OnInvisible();
	virtual void UpdateBounds();
	inline const VBound& GetBounds() const { return m_Bound; }
	virtual void Render();
protected:
	VVector2f		m_Position;		// local pos, relative to parent.
	VBound			m_Bound;		// bound rect.
	short			m_Layer;
private:
	VQuadTreeNode* m_SceneQTNode;		// private data. only accessed by scene.
};

class VApi VSceneNode : public VSceneObject
{

};

#endif 
